-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Tool Call Accuracy OpenAPI Tools #42494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances the Tool Call Accuracy evaluator to support OpenAPI tools in addition to regular function tools. OpenAPI tools contain multiple function definitions within a single tool definition, requiring special handling to properly validate tool calls and expand the tool definitions for evaluation.
- Adds support for OpenAPI tool definitions with embedded function collections
- Expands OpenAPI tool definitions to individual functions for validation
- Updates converters to handle OpenAPI tool extraction and model definitions
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.
File | Description |
---|---|
test_tool_call_accuracy_evaluator.py | Adds comprehensive test case for OpenAPI tool evaluation with currency lookup example |
_tool_call_accuracy.py | Implements OpenAPI tool expansion logic using itertools.chain to flatten function collections |
_models.py | Defines OpenAPIToolDefinition class and updates type annotations for tool definitions |
_ai_services.py | Adds OpenAPI tool extraction logic from thread runs with proper function mapping |
sdk/evaluation/azure-ai-evaluation/tests/unittests/test_tool_call_accuracy_evaluator.py
Outdated
Show resolved
Hide resolved
sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_converters/_models.py
Outdated
Show resolved
Hide resolved
sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_converters/_ai_services.py
Outdated
Show resolved
Hide resolved
sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_converters/_ai_services.py
Outdated
Show resolved
Hide resolved
sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_converters/_ai_services.py
Outdated
Show resolved
Hide resolved
sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_converters/_models.py
Show resolved
Hide resolved
sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_converters/_models.py
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Description
Please add an informative description that covers that changes made by the pull request and link all relevant issues.
If an SDK is being regenerated based on a new API spec, a link to the pull request containing these API spec changes should be included above.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines